home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Games: Greatest Hits 1996
/
Amiga Games: Greatest Hits 1996.iso
/
spiele
/
publicdomain
/
amigamud-tt
/
magic
/
checker.m
< prev
next >
Wrap
Text File
|
1996-07-05
|
2KB
|
75 lines
/*
* magic/checker.m
*/
/************* Learn Spell Checkers ************/
define tp_magic proc LC_Level(thing me, spell)status:
if me@p_pLevel >= spell@p_sLevel then
succeed
else
fail
fi
corp;
define tp_magic proc LC_Wizard(thing me, spell)status:
if IsProgrammer() then
succeed
else
fail
fi
corp;
/***** Checker stuff (public) ****/
use tp_base
public utility AddCastChecker(thing th; action a; bool front)void:
addChecker(th, p_sCastChecks, a, front);
corp;
public utility DelCastChecker(thing th; action a; bool front)void:
delChecker(th, p_sCastChecks, a, front);
corp;
public utility AddLearnChecker(thing th; action a; bool front)void:
addChecker(th, p_sLearnChecks, a, front);
corp;
public utility DelLearnChecker(thing th; action a; bool front)void:
delChecker(th, p_sLearnChecks, a, front);
corp;
public utility AddScribeChecker(thing th; action a; bool front)void:
addChecker(th, p_sScribeChecks, a, front);
corp;
public utility DelScribeChecker(thing th; action a; bool front)void:
delChecker(th, p_sScribeChecks, a, front);
corp;
unuse tp_base
public proc utility DoCastChecks(thing room)status:
DoChecks(room@p_rLookChecks)
corp;
/************* Spell Templates ************/
define tp_magic proc se_Default(thing spell; string arg)bool:
Print("There is a slight tingling as the magic is released.\n");
true
corp;
define tp_magic sm_DefaultSpell CreateThing(nil).
sm_DefaultSpell@p_sDesc:="Does nothing".
sm_DefaultSpell@p_sDice:="+0".
sm_DefaultSpell@p_sName:="Default".
sm_DefaultSpell@p_sCost:=0.
sm_DefaultSpell@p_sLevel:=0.
sm_DefaultSpell@p_sEffect:=se_Default.
define tp_magic sm_DefaultWSpell CreateThing(sm_DefaultSpell).
sm_DefaultWSpell@p_sLearnCheck:=LC_Wizard.